
package de.justphil.tcg.tcgandroidclient.content;

import android.graphics.Bitmap;


public class CardData {
	
	private int life;
	private int attack;
	private int defense;
	private int agility;
	private Bitmap image;
	private String name;
	private int[] propertyTypes;
	private final int type;
	
	public CardData(int type) {
	
		this(type, null, 0, 0, 0, 0, null, null);
	}
	
	public CardData(int type, String name, int life, int attack, int defense, int agility, Bitmap image,
			int[] propertyTypes) {
	
		this.type = type;
		setName(name);
		setLife(life);
		setAttack(attack);
		setDefense(defense);
		setAgility(agility);
		setImage(image);
		setPropertyTypes(propertyTypes);
		
	}
	
	public String getName() {
	
		return name;
	}
	
	public int getType(){
		
		return type;
	}
	
	public int[] getPropertyTypes() {
	
		return propertyTypes;
	}
	
	public int getLife() {
	
		return life;
	}
	
	public int getAttack() {
	
		return attack;
	}
	
	public int getDefense() {
	
		return defense;
	}
	
	public int getAgility() {
	
		return agility;
	}
	
	public Bitmap getImage() {
	
		return image;
	}
	
	public void setName(String name) {
	
		if (name == null || "".equals(name)) {
			name = "Unknown";
		}
		this.name = name;
	}
	
	public void setPropertyTypes(int[] propertyTypes) {
	
		if (propertyTypes == null) {
			propertyTypes = new int[0];
		}
		this.propertyTypes = propertyTypes;
	}
	
	public void setImage(Bitmap image) {
	
		this.image = image;
	}
	
	public void setLife(int life) {
	
		this.life = life;
	}
	
	public void setAttack(int attack) {
	
		this.attack = attack;
	}
	
	public void setDefense(int defense) {
	
		this.defense = defense;
	}
	
	public void setAgility(int agility) {
	
		this.agility = agility;
	}
}
